<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户查询</title>
<style type="text/css">
			table thead{
				background-color: #213C50;
				color: #EEF2F7;
				text-align: center;
			}
			table tbody{
				background-color: #EEF2F7;
				text-align: center;
			}
			table tfoot{
				background-color: #d1dcde;
				text-align: center;
			}
		</style>
</head>
<body>
<table>
	<thead>
		<tr>
			<td>序号</td>
			<td>用户名</td>
			<td>Email</td>
			<td>移动电话</td>
			<td>备注</td>
			<td>角色</td>
			<td>状态</td>
			<td>操作</td>
			<td>编辑</td>
			<td>授权</td>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="pageView.records" var="admin_list" status="st">
			<tr id="rowNum_${st.index}">
				<td>${admin_list.id }</td>
				<td>${admin_list.name }</td>
				<td>${admin_list.email }</td>
				<td>${admin_list.phone }</td>
				<td>${admin_list.remarks }</td>
				<td> 
					<s:if test="#admin_list.role.name!=null">${admin_list.role.name}</s:if>
					<s:else><font color="red" style="font-weight: bold;">无权</font></s:else>
				</td>
				<td><s:if test="#admin_list.state==1">活动</s:if><s:else>锁定</s:else></td>
				<td>
					<s:if test="#admin_list.state==1">
						<input class="admin" type="image"  src="/image/admin/64.gif" 
							onclick="lockAdmin(${admin_list.id },0,${pageView.currentpage},${pageView.maxrecord})"/>
					</s:if>
					<s:else>
						<input class="admin" type="image" src="/image/admin/23.gif" 
							onclick="lockAdmin(${admin_list.id },1,${pageView.currentpage},${pageView.maxrecord})"/>
					</s:else>
				</td>
				<td><input class="admin" type="image" src="/image/admin/edit.gif"
							onclick="editAdmin('rowNum_${st.index}',${pageView.maxrecord},${pageView.currentpage})"/></td>
				<td><input class="admin" type="image" src="/image/admin/pic23.gif" onclick="changeRole(${admin_list.id  },'${admin_list.name }')"/></td>
			</tr>
		</s:iterator>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="10">
				<font>当前页:第${pageView.currentpage}页 | 总记录数:${pageView.totalrecord}条 | 每页显示:${pageView.maxrecord}条 | 总页数:${pageView.totalpage}页</font>　
			</td>
		</tr>
		<tr>
			<td colspan="10">
				<c:forEach begin="${pageView.pageindex.startindex}" end="${pageView.pageindex.endindex}" var="page">
				    <c:if test="${pageView.currentpage==page}"><b><font color="#00ffff">${page}</font></b></c:if>
				    <c:if test="${pageView.currentpage!=page}"><a href="#"  onclick="userManager('/control/mapping/admin_queryAdmin.go?currentPage=${page}')">[${page}]</a></c:if>
				</c:forEach>
			</td>
		</tr>
	</tfoot>
</table>

</body>
</html>